
#ifndef CANVASWIDGET_H
#define CANVASWIDGET_H

#include <BButton>
#include <BSpinBox>
#include <BCheckBox>

#include "PixmapArea.h"

class CanvasWidget : public BWidget
{
	BOBJECT(CanvasWidget)
public:
	CanvasWidget();
	~CanvasWidget();

protected:
	void slotAssetChanged(BObject* object, const BValue& value);

	void slotCanvasResized(BObject* object, const BValue& value);
	void slotPixmapSizeChanged(BPixmap* pixmap, const BValue& value);
	void slotChooseCanvasImageButtonClicked(BObject* object, const BValue& value);
	void slotClearCanvasImageButtonClicked(BObject* object, const BValue& value);
	void slotChessGridCheckBoxToggled(BObject* object, const BValue& value);
	void slotGridDarknessEdited(BObject* object, const BValue& value);

protected:
	virtual void styleEvent(const BEvent& event);

private:
	BSpinBox*		_canvasWidthSpinBox;
	BSpinBox*		_canvasHeightSpinBox;
	BButton*		_canvasImageButton;
	BButton*		_clearImageButton;
	BCheckBox*		_chessGridCheckBox;
	BSpinBox*		_gridDarknessSpinBox;
	PixmapArea*		_pixmapArea;
};

#endif
